<template>
  <div>
    <el-table
      :data="list"
      border
      stripe
      style="width: 100% "
      highlight-current-row
    >
      <el-table-column prop="province" label="省份" align="center"/>
      <el-table-column prop="date" label="日期" width="160" align="center"/>
      <el-table-column prop="handle" label="处理量" align="center"/>
      <el-table-column prop="receipt" label="回单量" align="center"/>
      <el-table-column prop="receiptLv" label="回单率" align="center"/>
      <el-table-column prop="num" label="申告量" align="center"/>
      <el-table-column prop="repDisorder" label="重障量" align="center"/>
      <el-table-column prop="repDisorderLv" label="重障率" align="center"/>
      <el-table-column prop="betimes" label="及时量" align="center"/>
      <el-table-column prop="betimesLv" label="及时率" align="center"/>
      <el-table-column prop="succeed" label="成功率" align="center"/>
      <el-table-column label="操作" width="150" align="center">
        <template slot-scope="scope" class="active">
          <el-button type="primary" icon="el-icon-edit" circle @click="editData(scope.row)"/>
          <el-button type="danger" icon="el-icon-delete" circle @click="removeData(scope.row.id)"/>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import datastatistic from '@/api/datastatistic/datastatistic'
export default {
  data() {
    return {
      list: []
    }
  },
  created() {
    datastatistic.getDatastatisticList()
      .then(response => {
        this.list = response.data.datastatistics
      })
  },
  methods: {
    handleEdit(index, row) {
      console.log(index, row)
    },
    handleDelete(index, row) {
      console.log(index, row)
    }
  }
}
</script>
